#include<stdio.h>

int main(void)
{
	double a,b,c,d;
	scanf("%lf%lf%lf%lf",&a,&b,&c,&d);
	printf("%.2lf\n",1/(1/a+1/b));
	printf("%.2lf\n",1/(1/a+1/b+1/c+1/d));
	return 0;
}
